@import './variables.scss';

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  color: $text-color-primary;
}

* {
  box-sizing: border-box;
}

#app {
  height: 100%;
}

// 清除浮动
.clearfix {
  &::after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// 滚动条
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

// 基础布局类
.fl-left { float: left; }
.fl-right { float: right; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

// 间距类
.mt-10 { margin-top: 10px; }
.mr-10 { margin-right: 10px; }
.mb-10 { margin-bottom: 10px; }
.ml-10 { margin-left: 10px; }
.pt-10 { padding-top: 10px; }
.pr-10 { padding-right: 10px; }
.pb-10 { padding-bottom: 10px; }
.pl-10 { padding-left: 10px; }

// 宽高类
.w-100 { width: 100%; }
.h-100 { height: 100%; }

// 弹性布局
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.align-center { align-items: center; }
.flex-1 { flex: 1; }

// 文本溢出省略
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ellipsis-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

// 光标样式
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

// 自定义表单样式
.custom-form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  
  .form-btns {
    text-align: center;
    margin-top: 30px;
  }
}

// 页面容器
.page-container {
  padding: 20px;
  height: 100%;
}

// 卡片样式
.card-container {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  
  &.with-header {
    padding-top: 0;
    
    .card-header {
      padding: 16px 0;
      border-bottom: 1px solid $border-color-light;
      margin-bottom: 20px;
      
      .header-title {
        font-size: 16px;
        font-weight: 600;
        color: $text-color-primary;
      }
    }
  }
}

// 操作按钮
.action-btns {
  margin-bottom: 15px;
} 